<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'My Web Application',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
		'application.components.Rates.*',
	),
	

	'modules'=>array(
		// uncomment the following to enable the Gii tool
		///*
		'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'123',
		 	// If removed, Gii defaults to localhost only. Edit carefully to taste.
			'ipFilters'=>array('127.0.0.1','::1'),
		),
		//*/
	),

	// application components
	'components'=>array(
	    'mailer' => array(
	      'class' => 'application.extensions.mailer.EMailer',
	      'pathViews' => 'application.views.email',
	      'pathLayouts' => 'application.views.email.layouts'
	   ),
		'user'=>array(
			// enable cookie-based authentication
			'class' => 'application.components.WebUser',
			'allowAutoLogin'=>true,
	    	'loginUrl' => array('customer/login'),
		),
		
		// uncomment the following to enable URLs in path-format
		/*
		'urlManager'=>array(
			'urlFormat'=>'path',
			'rules'=>array(
				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			),
		),
		*/
		'db'=>array(
            'connectionString' => 'sqlsrv:Server=127.0.0.1;Database=post3;',
			'username' => 'sa',
			'password' => '123',
        ),
		'mydb'=>array
		(
			'class'=>'CDbConnection',
			'connectionString' => 'mysql:host=127.0.0.1:3307;dbname=wholesale',
			'emulatePrepare' => true,
			'username' => 'ens',
			'password' => 'ens1234',
			'charset' => 'utf8',
		),
		'enticedb'=>array
		(
			'class'=>'CDbConnection',
		    'connectionString'=>'oci:dbname=127.0.0.1:1522/entice',
			'emulatePrepare' => true,
			'username' => 'entice',
			'password' => 'entice',
		),
		'testdb'=>array
		(
			'class'=>'CDbConnection',
		    'connectionString'=>'oci:dbname=127.0.0.1:1522/entice',
			'username' => 'entice',
			'password' => 'entice',
		),
				
		// uncomment the following to use a MySQL database
		/*
		'db'=>array(s
			'connectionString' => 'mysql:host=localhost;dbname=testdrive',
			'emulatePrepare' => true,
			'username' => 'root',
			'password' => '',
			'charset' => 'utf8',
		),
		*/
		'errorHandler'=>array(
			// use 'site/error' action to display errors
            'errorAction'=>'site/error',
        ),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
//				array(
//					'class'=>'CFileLogRoute',
//					'levels'=>'error, warning',
//				),
				// uncomment the following to show log messages on web pages
				
//				array(
//					'class'=>'CWebLogRoute',
//				),
				
			),
		),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'quoctuan261@gmail.com',
		'AUTHORIZENET_API_LOGIN_ID' => '8vUj8vA6M',
		'AUTHORIZENET_TRANSACTION_KEY' => '856cBtJ3X6RGCk4N',
		'AUTHORIZENET_SANDBOX' => true ,
	
		'PAYPAL_SANDBOX' => true,
		'PAYPAL_URL' => 'https://www.paypal.com/webscr&cmd=_express-checkout&token=',
		'PAYPAL_URL_TEST' => 'https://sandbox.paypal.com/webscr&cmd=_express-checkout&token=',
		'paypal_version' => '65.1',
		'paypal_API_UserName' => 'hung_1331707613_biz_api1.loginvn.com',
		'paypal_API_Password' => '1331707638',
		'paypal_API_Signature' => 'AsqEL8HMn1GNU58NVNCHFAfSlIHwA.SBkAV4qYySDrt--t5jPLc-EXVm ',
		'paypal_subject' => '',
		
		'PAYPAL_CMD' => '_xclick',
		'PAYPAL_BUSINESS' => 'hung@loginvn.com',
		'PAYPAL_CURRENCY_CODE' => 'USD',
		'PAYPAL_ITEM_NAME' => 'Pinless Refill From BaTam for',
		'PAYPAL_ADD' => 1,
		'PAYPAL_IMAGE_LOGO' => 'http://thebatam.com/images/logo.png',
		'PAYPAL_RETURN_URL' => 'Customer/PaypalComplete',
		'PAYPAL_CANCEL_URL' => 'Customer/PaypalCancel',
		'BASE_URL' => 'http://localhost:8081/Yii/mycompany',
		
	),
);